#
# @author Wójcik Karol <wojcikk@student.agh.edu.pl>
# @licence http://www.gnu.org/copyleft/gpl.html GNU/GPL
#

class CreateLessons < ActiveRecord::Migration
  def self.up
    create_table :lessons do |t|
       t.column :subject_id, :int
       t.column :class_type_id, :int
       t.column :lgodznazaj, :int
       t.column :lgrroz, :float
       t.column :lgrzaj, :float
       t.column :semestr, :string
    end
    create_table :lessons_users do |t|
       t.column :user_id, :int
       t.column :lesson_id, :int
       t.column :lgrzaj, :float
       t.column :lgrroz, :float
    end
  end

  def self.down
    drop_table :lessons
    drop_table :lessons_users
  end
end
